<?php

/**
 * 趣炫数据中心接入
 * @author yuxun
 *
 */
class QuxuanController extends ApiBaseController {

    /**
     * 获取服务器列表（监控所用）
     * http://admin.s10.q-dazzle.com:8090/api/?r=quxuan/backups
     */
    public function backups(){
    	$modServer = new ModServer();
    	$params = array();
    	$params['g'] = 'mango';
    	$serverList = $modServer->select($params);
    	$data = '';
    	foreach ($serverList as $key=>$val){
    		$develop_id_array = explode('_', $val['develop_id']);
    		$develop_id = $develop_id_array[1]? $develop_id_array[1] : $develop_id_array[0];
    		$d = 'S10-'.$develop_id.'-'.$val['server_num'].'-'.$val['open_time'].'-'.$val['ip'].'-'.$val['hefu_flag'].'-'.$val['union_time'].'-'.$val['status'];
    		$data = $data.$d."\r\n";
    	}
    	$json_arr = array('status'=>200,'msg'=>'查询成功','data'=>$data );
    	ApiBaseService::doLog($_POST, $json_arr);
    	exit(json_encode($json_arr));
    }
    
   

}